package lamnhungoc.dao.impl;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import lamnhungoc.dao.SachDao;
import lamnhungoc.pojo.Sach;

@Repository
@Transactional
public class SachDaoImpl implements SachDao{

	@Autowired
	private SessionFactory sessionFactory;

	@Override
	public List<Sach> getBookList() {
		return sessionFactory.getCurrentSession().createCriteria(Sach.class).list();
	}

}
